<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>层级选择器</title>
    <script src="../js/jquery-3.3.1.min.js"></script>
</head>
<body>
<div>div1</div>
<div>
        <span>
            span1
        </span>
</div>
<div>
        <span>
            span2
        </span>
</div>
</body>
<script>
       let arr =$("div span");
       alert(arr.length)
        let arr2=$("div > span")
        alert(arr2.length)

</script>
</html>